<template>
  <div>
      <van-tabbar v-model="active" @change="onchange" >
        <van-tabbar-item to="/" name="Home" icon="music-o">发现</van-tabbar-item>
        <van-tabbar-item to="/Boke" name="Boke" icon="bulb-o">播客</van-tabbar-item>
        <van-tabbar-item to="/Mine" name="Mine" icon="service-o">我的</van-tabbar-item>
        <van-tabbar-item to="/Guan" name="Guan" icon="friends-o">关注</van-tabbar-item>
        <van-tabbar-item to="/Yun" name="Yun" icon="aim">云村</van-tabbar-item>

      </van-tabbar>
  </div>
</template>
<script>
export default {
 
  data() {
    return {
      active:''
    };
  },
  components: {},
  methods:{
    onchange(ind){ //ind 是对应的name
      // this.active = ind
      // this.$router.push({"name":ind})
      console.log(11111,ind)
    }
  },
  created(){
    this.active = this.$route.name
  },
  mounted(){
      console.log(this)
  }
};
</script>
<style lang="less" scoped>

</style>